package unimelb.discussiontracker.twitter.web.converter;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractListConverter<F, T> implements IListConverter<F, T> {

    @Override
    public List<T> convert(List<F> from) {
        final List<T> result = new ArrayList<T>();
        for (final F item : from) {
            result.add(convertItem(item));
        }
        return result;
    }

    protected abstract T convertItem(F from);
}
